package com.itheima.test6;

public class TestSwimming {
    public static void main(String[] args){
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("茄汁我们去游泳吧！");
            }
        });
    }

    /**
     * 使用接口的方法
     */
    public static void goSwimming(Swimming swimming){
       /* Swimming swim=new Swimming() {
            @Override
            public void swim() {
                System.out.println("茄汁我们取游泳吧！");
            }
        };*/
        swimming.swim();
    }
}
